//
//  GradeView.m
//  cm
//
//  Created by suyibaishan on 2017/11/10.
//  Copyright © 2017年 feihu. All rights reserved.
//

#import "GradeView.h"

@implementation GradeView

-(id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self constructUI];
    }
    return self;
}

-(void)constructUI
{
    _imgView = [[UIView alloc] init];
    _imgView.backgroundColor = [UIColor colorWithRed:0.25 green:0.56 blue:0.99 alpha:1];
    [self addSubview:_imgView];
    _imgView.sd_layout
    .topSpaceToView(self, 10)
    .leftSpaceToView(self, 5)
    .widthIs(5)
    .heightIs(5);
    
    _nameLabel = [[UILabel alloc] init];
//    _nameLabel.textAlignment = NSTextAlignmentCenter;
    _nameLabel.font = [UIFont systemFontOfSize:11];
    _nameLabel.textColor = [UIColor colorWithRed:0.2 green:0.2 blue:0.2 alpha:1];
    [self addSubview:_nameLabel];
    _nameLabel.sd_layout
    .topSpaceToView(self, 0)
    .leftSpaceToView(_imgView, 5)
    .widthIs(40)
    .heightIs(20);
}

@end
